// 敌机

const g = require('../utils/global');

class EnemyModel {
    constructor(id, startX) {
        this.type = g.EnemyType.first;
        // this.pos = cc.v2(0, 0);
        this.startPos = cc.v2(startX, g.SKY_HEIGHT);
        this.status = 0;
        this.cmd = [];
        this.id = id || 0;
        this.isDead = false;
    }

    toDie(playTime) {
        this.cmd.push({
            action: g.ActionType.toDie,
            playTime: playTime,
            keepTime: g.AnimTime.enemyDie,
        });
        this.isDead = true;
    }
}

module.exports = {
    EnemyModel,
};